import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home/Home.vue'
// import Cart from '../views/Cart/cart.vue'
import {
  cart
} from './cart'
import Login from '../views/Login/login.vue'
import Personal from '../views/Personal/Personal.vue'
// 分页面 
import erji from "./erji"
Vue.use(VueRouter)


const routes = [
  ...cart,
  ...erji,
  {
    path: '/',
    redirect:"/home"
  },
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/personal',
    name: 'personal',
    component: Personal
  },
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router